<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ProjectControl.ascx.cs" Inherits="Awaken.CodeGen.Controls.ProjectControl" %>
<div>
    <a href="~/Default.aspx" runat="server">back to projects</a><br />
    <br />

    <span style="font-size:16px; font-weight:bold;">Project:</span><br />
    <table>
        <tr>
            <td>Project Name:</td>
            <td><asp:TextBox ID="projectNameTextBox" Width="500px" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td>Class Directory:</td>
            <td><asp:TextBox ID="classDirectoryTextBox" Width="500px" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td>Mapping Directory:</td>
            <td><asp:TextBox ID="mappingDirectoryTextBox" Width="500px" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td>Test Directory:</td>
            <td><asp:TextBox ID="testDirectoryTextBox" Width="500px" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td>Namespace:</td>
            <td><asp:TextBox ID="namespaceTextBox" Width="500px" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td>Assembly:</td>
            <td><asp:TextBox ID="assemblyTextBox" Width="500px" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td>Connection String:</td>
            <td><asp:TextBox ID="connectionStringTextBox" Width="600px" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td>Database Name:</td>
            <td><asp:TextBox ID="databaseNameTextBox" Width="600px" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>
                <asp:Button ID="saveButton" OnClick="saveButton_OnClick" Text="Save" runat="server" />&nbsp;            
                <asp:Button ID="loadButton" OnClick="loadButton_OnClick" Text="Load" runat="server" />
            </td>
        </tr>
    </table>
    
    <hr style="color:Black; width:800px; text-align:left;" />
    
    <asp:Panel ID="tablePanel" Width="700px" Visible="false" runat="server">
                
        <table style="width:800px;">
            <tr>
                <td style="width:700px" valign="top">
                    <b>Single Key Table(s):</b>                  
                    <asp:GridView ID="grid" Width="700px" OnRowCommand="grid_OnRowCommand" AutoGenerateColumns="false" runat="server">
                        <Columns>
                            <asp:BoundField DataField="TableName" HeaderText="Table" ItemStyle-Width="200px" />
                            <asp:BoundField DataField="ClassName" HeaderText="Class" ItemStyle-Width="200px" />
                            <asp:ButtonField CommandName="PreviewClass" Text="Preview Class" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px" />
                            <asp:ButtonField CommandName="GenerateClass" Text="Generate Class" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px" />
                            <asp:ButtonField CommandName="PreviewMapping" Text="Preview Mapping" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px" />
                            <asp:ButtonField CommandName="GenerateMapping" Text="Generate Mapping" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px" />                           
                            <asp:ButtonField CommandName="PreviewTest" Text="Preview Test" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px" />
                            <asp:ButtonField CommandName="GenerateTest" Text="Generate Test" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="50px" />                           
                        </Columns>
                    </asp:GridView>
                </td>
                <td style="width:100px; background-color:#eeeeee;" valign="top">
                    
                    <b>Detail(s):</b><br />
                    <asp:Label ID="informLabel" Width="100px" runat="server"></asp:Label>
                
                </td>
            </tr>
        </table>
                    
        <asp:Button ID="allButton" OnClick="allButton_OnClick" Text="Generate All" runat="server" />
    
                
        <hr style="color:Black; width:800px; text-align:left;" />   
        
        <div style="width:800px; overflow:auto;">
            <b>Preview:</b>  
            <pre id="preview" runat="server"></pre>
        </div>
        
    </asp:Panel>
</div>